import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  mode: 'history',
  baseUrl: '/',
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/introduce',
      name: 'introduce',
      component: resolve => require(['@/components/jianli'], resolve)
    },
    {
      path: '/liuyan',
      name: 'liuyan',
      component: resolve => require(['@/components/liuyan'], resolve)
    },
    {
      path: '/share',
      name: 'share',
      component: resolve => require(['@/components/share'], resolve)
    },
    {
      path: '/news/:id.html',
      name: 'news',
      component: resolve => require(['@/components/text'], resolve)
    },
    {
      path: '*',
      component: resolve => require(['@/components/404'], resolve)
    },
    {
      path: '/newlist',
      name: 'newlist',
      component: resolve => require(['@/components/news/new1'], resolve)
    },
    {
      path: '/newlist/id/:id.html',
      name: 'newstext',
      component: resolve => require(['@/components/news/new2'], resolve)
    }
  ]
})
